import axios from 'axios'
const axiosInstance = axios.create({
  baseURL: 'http://localhost:8080',
  withCredentials: true
})
axiosInstance.interceptors.request.use(
  (config:any) =>{
    const token = localStorage.getItem('token');

    if(token){

      config.headers.Authorization='Bearer ' +token
    }
    return config;
  },
)
// 切面 统一请求携带token 返回值统一异常处理
// axiosInstance
export default axiosInstance;